//
//  BaseADViewController.h
//  TestDialogue
//
//  Created by Hepburn Alex on 13-2-6.
//  Copyright (c) 2013年 Hepburn Alex. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"
#import "MJRefresh.h"

typedef enum {
    TNavBarType_Normal,
    TNavBarType_Light,
    TNavBarType_Alpha,
} TNavBarType;

@interface BaseADViewController : UIViewController {
    UILabel *mlbTitle;
    MBProgressHUD *mLoadView;
    UIImageView *mShadowView;
    BOOL mbStatusBarHidden;
    UIStatusBarStyle mStatusBarStyle;
    UILabel *mlbMsg;

}

@property (nonatomic, strong) NSString *mLoadMsg;
@property (nonatomic, assign) id delegate;
@property (nonatomic, assign) SEL OnGoBack;
@property (nonatomic, readonly) MBProgressHUD *mLoadView;

//topbar
@property (nonatomic, readonly) UILabel *mlbTitle;
@property (nonatomic, retain) UIImage *mShadowImage;
@property (nonatomic, retain) UIColor *mTitleColor;
@property (nonatomic, retain) UIColor *mTopColor;
@property (nonatomic, retain) UIImage *mTopImage;
@property (nonatomic, assign) TNavBarType mNavType;
@property (nonatomic, assign) int mFontSize;
@property (nonatomic, strong) UIView *mBlurView;
@property (nonatomic, assign) float mfScale;




- (void)GoBack;
- (void)GoHome;
- (void)StartLoading;
- (void)StopLoading;
- (void)showMsg:(NSString *)msg;

- (void)ClearNavItem;
- (void)AddRightTextBtn:(NSString *)name target:(id)target action:(SEL)action;
- (void)AddRightImageBtn:(UIImage *)image target:(id)target action:(SEL)action;
- (void)AddRightImageBtn:(UIImage *)image target:(id)target action:(SEL)action scale:(float)scale;
- (void)AddLeftTextBtn:(NSString *)name target:(id)target action:(SEL)action;
- (void)AddLeftImageBtn:(UIImage *)image target:(id)target action:(SEL)action;
- (void)AddLeftImageBtn:(UIImage *)image target:(id)target action:(SEL)action scale:(float)scale;

- (UIButton *)GetTextButton:(NSString *)text target:(id)target action:(SEL)action;
- (UIBarButtonItem *)GetTextBarItem:(NSString *)name target:(id)target action:(SEL)action;

- (UIButton *)GetImageButton:(UIImage *)image target:(id)target action:(SEL)action scale:(float)scale left:(BOOL)bLeft;
- (UIBarButtonItem *)GetImageBarItem:(UIImage *)image target:(id)target action:(SEL)action scale:(float)scale left:(BOOL)bLeft;

- (void)AddRightImageBtns:(NSArray *)array;
- (void)AddLeftImageBtns:(NSArray *)array;
- (void)AddRightImageBtns:(NSArray *)array target:(id)target action:(SEL)action;
- (void)AddLeftImageBtns:(NSArray *)array target:(id)target action:(SEL)action;


- (void)RefreshNavColor;
- (void)RefreshNavColor:(UIColor *)color;

//设置导航栏的颜色
- (void)setTopColor:(UIColor *)color;
//改变导航栏上文字的颜色
- (void)settopTextColor:(UIColor *)color;

- (void)RefreshShadow;

- (UIView *)GetInputAccessoryView;

- (void)HideStatusBar:(BOOL)hide;
- (void)RefreshStatusBarStyle:(UIStatusBarStyle)barStyle;

#define DEFAULT_BACKCOLOR   [UIColor colorWithRed:0.94 green:0.94 blue:0.96 alpha:1.0]

@end
